import { BasicColumn, FormSchema } from '@/components/Table';
import { h, ref } from 'vue';
import { Tag } from 'ant-design-vue';

import { useUserStore } from '@/store/modules/user';

const userStore = useUserStore();

//表格列名
export const columns: BasicColumn[] = [
  {
    title: 'userId',
    dataIndex: 'userId',
  },
  {
    title: '昵称',
    dataIndex: 'nickName',
  },
  {
    title: '预留手机',
    dataIndex: 'phone',
  },
  {
    title: '工众号openId',
    dataIndex: 'gzhOpenId',
  },
  {
    title: '小程序openId',
    dataIndex: 'openId',
  },
  {
    title: 'unionId',
    dataIndex: 'unionId',
  },
  {
    title: '创建时间',
    dataIndex: 'createTime',
  },
];

export const searchFormSchema: FormSchema[] = [
  {
    field: 'keyword',
    label: '搜索',
    component: 'Input',
    colProps: { span: 8 },
    componentProps: {
      placeholder:"手机/昵称/openid"
    }
  },
];

export const formSchema: FormSchema[] = [
  {
    field: 'name',
    label: '字典名称',
    required: true,
    component: 'Input',
  },
  {
    field: 'type',
    label: '类别',
    component: 'Select',
    required: true,
    defaultValue: 1,
    componentProps: {
      options: [{ label: '费用类型', value: 1 }],
    },
  },
];
